package org.example.course.service.impl;

import org.example.course.domain.Standard;
import org.example.course.mapper.StandardMapper;
import org.example.course.service.StandardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Classname StandardServiceImpl
 * @Description TODO
 * @Date 2020/5/9 20:56
 * @Created by
 */

@Service
public class StandardServiceImpl implements StandardService {

    @Autowired
    private StandardMapper mapper;

    @Override
    public boolean create(Standard standard) {
        int msg = mapper.insert(standard);
        return msg > 0;
    }

    @Override
    public boolean update(Standard standard) {
        int msg = mapper.updateByPrimaryKeySelective(standard);
        return msg > 0;
    }
}
